from selenium.webdriver.common.by import By

from common.Base import Base


class IndexPege(Base):
    index_url = 'http://139.129.26.163/user.php'

    def font_text(self):
        return self.get_element_text((By.CLASS_NAME, 'f4_b'))
    def a_logtuo(self):
        self.click((By.LINK_TEXT, '退出'))
    def bao1(self):
        return self.get_element_text((By.LINK_TEXT, '学院风简约双肩包'))
    def qk(self):
        return self.get_element_text((By.LINK_TEXT, '购物车(0)'))
    def qk1(self):
        return self.get_element_text((By.LINK_TEXT, '购物车(1)'))
    def qk2(self):
        return self.get_element_text((By.LINK_TEXT, 'V领短袖T恤 女款'))
    def qk3(self):
        return self.get_element_text((By.LINK_TEXT, '炫彩翻页保护套'))
    def qk4(self):
        return self.get_element_text((By.XPATH, '//*[@id="formCart"]/table[1]/tbody/tr[2]/td[3]'))
    def qk5(self):
        return self.get_element_text((By.XPATH, '//*[@id="formCart"]/table[1]/tbody/tr[2]/td[4]'))
    def qk6(self):
        return self.get_element_text((By.XPATH, "//form[@id='formCart']/table/tbody/tr[2]/td[5]/input"))


